from utils.api import API
from django.conf.urls import url
from storehouse.forms import *
from storehouse.views import views_admin, views_info

baseUrl = "/api/storehouse/"

storehouseAddAPI = API(StorehouseAddForm, method='POST', moduleUrl='add/', urlPrefix=baseUrl)
getStorehouseInfoAPI = API(GetStorehouseInfoForm, method='POST', moduleUrl='msgshow/', urlPrefix=baseUrl)
changeStorehouseInfoAPI = API(ChangeStorehouseInfoForm, method='POST', moduleUrl='msgchange/', urlPrefix=baseUrl)
# getIPListAPI = API(GetIPListForm, method='POST', moduleUrl='IPget/', urlPrefix=baseUrl)
IPChangeAPI = API(IPChangeForm, method='POST', moduleUrl='IPchange/', urlPrefix=baseUrl)
getSubStoreListAPI = API(GetSubStoreListForm, method='POST', moduleUrl='list/', urlPrefix=baseUrl)
subStorehouseMsgAPI = API(SubStorehouseMsgForm, method='POST', moduleUrl='subInfo/', urlPrefix=baseUrl)
getWarZoneListAPI = API(GetWarZoneListForm, method='POST', moduleUrl='warzone/', urlPrefix=baseUrl)
getCompanyListAPI = API(GetCompanyListForm, method='POST', moduleUrl='company/', urlPrefix=baseUrl)
storehouseOperationAPI = API(StorehouseOperationForm, method='POST', moduleUrl='operations/', urlPrefix=baseUrl)
storeScreenAPI = API(StoreScreenForm, method='POST', moduleUrl='screen/', urlPrefix=baseUrl)
getSelectAPI = API(GetSelectForm, method='POST', moduleUrl='getselect/', urlPrefix=baseUrl)
warzoneGetAPI = API(WarzoneGetForm, method='POST', moduleUrl='warZoneList/', urlPrefix=baseUrl)
zoneOptionAPI = API(ZoneOptionForm, method='POST', moduleUrl='warZoneOption/', urlPrefix=baseUrl)
companyGetAPI = API(CompanyGetForm, method='POST', moduleUrl='companyList/', urlPrefix=baseUrl)
companyOptAPI = API(CompanyOptForm, method='POST', moduleUrl='companyOption/', urlPrefix=baseUrl)

urlpatterns = [
    url(storehouseAddAPI.moduleUrl, views_admin.storehouseAdd),
    url(getStorehouseInfoAPI.moduleUrl, views_info.getStorehouseInfo),
    url(changeStorehouseInfoAPI.moduleUrl, views_info.changeStorehouseInfo),
    # url(getIPListAPI.moduleUrl, views_admin.getIPList),
    url(IPChangeAPI.moduleUrl, views_admin.IPChange),
    url(getSubStoreListAPI.moduleUrl, views_info.getSubStoreList),
    url(subStorehouseMsgAPI.moduleUrl, views_info.subStorehouseMsg),
    url(getWarZoneListAPI.moduleUrl, views_admin.getWarZoneList),
    url(getCompanyListAPI.moduleUrl, views_admin.getCompanyList),
    url(storehouseOperationAPI.moduleUrl, views_admin.storehouseOperation),
    url(storeScreenAPI.moduleUrl, views_info.storeScreen),
    url(getSelectAPI.moduleUrl, views_admin.getSelect),
    url(warzoneGetAPI.moduleUrl, views_info.warzoneGet),
    url(zoneOptionAPI.moduleUrl, views_info.zoneOption),
    url(companyGetAPI.moduleUrl, views_info.companyGet),
    url(companyOptAPI.moduleUrl, views_info.companyOption),
]
